import request from '../../utils/request.js'

const state ={
	homeList:[],
	indexList:[],
	lowerList:[]
}
const mutations={
	SET_HOMELIST(state,homeList){
	 state.homeList = homeList
	},
	SET_INDEXLIST(state,indexList){
		state.indexList=indexList
	},
	SET_LOWERLIST(state,lowerList){
		state.lowerList=lowerList
	}
}
const actions ={
	async getHomeList({commit}){
			const result =await request('/homeList')
			// console.log(result)
			commit('SET_HOMELIST',result)
	},
	async getindexList({commit}){
		const result =await request('/indexList')
		// console.log(result,'getindexList')
		commit('SET_INDEXLIST',result)
	},
	async getlowerList({commit}){
		const result =await request('/lowerList')
		// console.log(result,'lowerList')
		commit('SET_LOWERLIST',result)
	}
}
const getters ={

}


export default{
	namespaced:true,
	state,
	mutations,
	actions,
	getters
}